/*
 * =====================================================================================
 *
 *       Filename:  LinkedStack.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  11/09/2012 02:02:59 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Kjeldahl (), 
 *   Organization:  
 *
 * =====================================================================================
 */

#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#define SIZE 100
#define elmType int

typedef struct Stackdata{
	elmType *data;
	struct Stackdata *next;
}Stackdata;

typedef struct {
	Stackdata *top;
	int length;
}LinkedStack;

LinkedStack * initLinkedStack();
Stackdata * createElm();
void  emptyLinkedStack(LinkedStack *S);
void destroyLinkedStack(LinkedStack *S);
elmType *getTop(LinkedStack *S);
int getLength(LinkedStack *S);
void showLinkedStack(LinkedStack *S);
void push(LinkedStack *S,elmType value);
elmType pop(LinkedStack *S);
bool isempty(LinkedStack *S);

